<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="__CSS__/table.css" rel="stylesheet" type="text/css" />
<script src="__JS__/jquery-1.6.2.min.js"></script>
<script src="__JS__/popup/popup.js"></script>
<script src="__JS__/popup/user.js"></script>
<script>
$(document).ready(function(){
	
	$("#del").bind("click",function(){
		var _chekList=[];
		$("input[name='checkData[]']").each(function(){
			if($(this).attr("checked")){
				_chekList.push($(this).val());
			}
		});
		if(_chekList.length>0){
			_chekList=_chekList.join(',');
			pConfirm("提示","确认要删除？",_chekList);
		}
	});
	
	
	$("#submit").bind("click",function(){
		var _url=window.location.href;
		var _list=_url.split('?');
		var _http=_list[0];
		var _pList=_list[1].split('&');
		var _usePara=[];
		for(var i=0;i<_pList.length;i++ ){
			var _p=_pList[i];
			var _t=_p.split('=')[0];
			if(_t=='g' || _t=='m' || _t=='a' || _t=="type"){
				_usePara.push(_p);
			}
		}
		
		var _newHttp=_http+"?"+_usePara.join('&');
		
		_newHttp+="&U_NAME="+encodeURI($("#U_NAME").val())+"&U_RNAME="+encodeURI($("#U_RNAME").val());
		window.location.href=_newHttp;
		
	});
	
	$("#submit1").bind("click",function(){
		var _url=window.location.href;
		var _list=_url.split('?');
		var _http=_list[0];
		var _pList=_list[1].split('&');
		var _usePara=[];
		for(var i=0;i<_pList.length;i++ ){
			var _p=_pList[i];
			var _t=_p.split('=')[0];
			if(_t=='g' || _t=='m' || _t=='a'  || _t=='t' || _t=='f1' || _t=='f2' || _t=="type"){
				_usePara.push(_p);
			}
		}
		if($("#AR_ADDRESS").val()==""){
			$("#AR_ID").val('');
		}
		var _newHttp=_http+"?"+_usePara.join('&');
		
		_newHttp+="&ST_NAME="+encodeURI($("#ST_NAME").val())+"&RP_U_RNAME="+encodeURI($("#RP_U_RNAME").val())+"&AR_ADDRESS="+encodeURI($("#AR_ADDRESS").val())+"&AR_ID="+encodeURI($("#AR_ID").val());
		
		window.location.href=_newHttp;
		
	});
	
	$("#sAr").bind("click",function(){
		var url="?g=Admin&m=Index&a=sarea&f1=AR_ID&f2=AR_ADDRESS";
		pDialog('',url,500,380);
	});
	
});


function lineDel(u_id){
	if(window.confirm("此删除操作是物理删除，删除的数据不能恢复，确认删除？")){
	var url="?g=Admin&m=Team&a=wdel&st_id="+u_id;
	$.ajax({
		   type: "GET",
		   url: url,
		   success: function(msg){
		     if(msg=='y'){
		    	 //pAlertN("提示","删除用户成功");
		    	 alert("删除用户成功");
		    	 window.location.reload();
		     }else{
		    	 //pAlertN("提示","删除用户失败"); 
		    	 alert("删除用户失败");
		     }
		   }
		});
	}
}

function lineDelU(u_id){
	if(window.confirm("此删除操作是物理删除，删除的数据不能恢复，确认删除？")){
		var url="?g=Admin&m=User&a=wdel&uid="+u_id;
		$.ajax({
			   type: "GET",
			   url: url,
			   success: function(msg){
				 
			     if(msg=='y'){
			    	 //pAlertN("提示","删除用户成功");
			    	 alert("删除用户成功");
			    	 window.location.reload();
			     }else{
			    	 //pAlertN("提示","删除用户失败"); 
			    	 alert("删除用户失败");
			     }
			   }
			});
	}
	
}


</script>
<style>
a {color:#FFFFFF}
</style>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                
                <td width="100%" valign="bottom"><span class="STYLE1"><h2>物理删除数据，请谨慎操作</h2>
               
                </span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="STYLE1">
              </span><span class="STYLE1"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  	<td>&nbsp;</td>
  </tr>
  <tr>
  <td>
  <span class="STYLE10" >
  <a href="?g=Admin&m=User&a=listu&type=1">
	  <if condition="$type eq '1'">
	  	<b>[删除服务队用户]</b>
	  <else />
	  [删除服务队用户]
	  </if>
  </a> &nbsp; &nbsp;
  <a href="?g=Admin&m=User&a=listu&type=2">
  <if condition="$type eq '2'">
  	 <b>[删除服务队]</b>
  <else />
	  [删除服务队]
  </if>
 
  </a></span>
  </td>
  </tr>
  <if condition="$type eq '1'">
  <tr>
  	<td align="center">
  		<form action="" method="post">
	  		<table width="50%" border="0" cellpadding="0" cellspacing="0" bgcolor="#a8c7ce">
	  			<tr>
	  				<td bgcolor="#FFFFFF"><span class="STYLE10">会员名：</span></td>
	  				<td bgcolor="#FFFFFF">
	  					<input type="text" name="U_NAME" id="U_NAME" value="{$U_NAME}"></input>
	  				</td>
	  				<td bgcolor="#FFFFFF"><span class="STYLE10">姓名：</span></td>
	  				<td bgcolor="#FFFFFF">
	  					<input type="text" name="U_RNAME" id="U_RNAME" value="{$U_RNAME}"></input>
	  				</td>
	  				<td bgcolor="#FFFFFF">
	  					<input type="button" name="submit" id="submit" value="查询"></input> 
	  				</td>
	  			</tr>
	  		</table>
  		</form>
  	</td>
  </tr>
  <tr>
    <td>
    
    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce" >
      <tr>
        <th width="4%" height="20" bgcolor="d3eaef" class="STYLE10"><div align="center">
          <input type="checkbox" id="allCheckData"/>
        </div></th>
        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">会员名</span></div></th>
        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">姓名</span></div></th>
        <th width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户角色</span></div></th>
        <th width="14%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">联系方式</span></div></th>
        <th width="16%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">邮箱</span></div></td>
        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">是否停用</span></div></th>
        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">逻辑删除</span></div></th>
        <th width="14%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">基本操作</span></div></th>
      </tr>
      <volist name="userList" id="data">
		<tr>
	        <td height="20" bgcolor="#FFFFFF"><div align="center">
	          <input type="checkbox" name="checkData[]" id="checkData_{$data.U_ID}" value="{$data.U_ID}" />
	        </div></td>
	        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.U_NAME}</span></div></td>
	        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.U_RNAME}</span></div></td>
	        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">{$data.R_NAME}</div></td>
	        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">{$data.U_MOBILE}</div></td>
	        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">{$data.U_EMAIL}</div></td>
	        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
	        <if condition="$data.IS_BLOCK eq 1">
	        	停用
	        <else/>
	        	正常
	        </if>
	        </div></td>
	          <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
	        <if condition="$data.IS_DEL eq 1">
	        	<font color="red">是</font>
	        <else/>
	        	否
	        </if>
	        </div></td>
	        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21"><a href="#" onclick="lineDelU('{$data.U_ID}');return false;">删除</a> </div></td>
      	</tr>
      </volist>
    </table>
    
    </td>
  </tr>
  </if>
  
  <if condition="$type eq '2'">
  <tr>
	  	<td align="center">
	  		<form action="" method="post">
		  		<table width="60%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#a8c7ce">
		  			<tr>
		  				<td bgcolor="#FFFFFF"><span class="STYLE10">名称：</span></td>
		  				<td bgcolor="#FFFFFF" >
		  					<input class="searchInput" type="text" name="ST_NAME" id="ST_NAME" value="{$ST_NAME}"></input>
		  				</td>
		  				<td bgcolor="#FFFFFF"><span class="STYLE10">地区：</span></td>
		  				<td bgcolor="#FFFFFF" align="left">
		  					<input class="searchInput" type="text" name="AR_ADDRESS" id="AR_ADDRESS" value="{$AR_ADDRESS}"></input>
		  					<input type="hidden" name="AR_ID" id="AR_ID" value="{$AR_ID}"></input>
		  					<span class="spanButton" id="sAr">&nbsp;查&nbsp;</span>
		  				</td>
		  				<td bgcolor="#FFFFFF"><span class="STYLE10">联系人：</span></td>
		  				<td bgcolor="#FFFFFF">
		  					<input class="searchInput" type="text" name="RP_U_RNAME" id="RP_U_RNAME" value="{$RP_U_RNAME}"></input>
		  				</td>
		  				
		  				<td bgcolor="#FFFFFF">
		  					<input type="button" name="submit1" id="submit1" value="查询"></input> 
		  				</td>
		  			</tr>
		  		</table>
	  		</form>
	  	</td>
	  </tr>
	  <tr>
	    <td>
	    
	    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce" >
	      <tr>
	        <th width="4%" height="20" bgcolor="d3eaef" class="STYLE10"><div align="center">
	          <input type="checkbox" id="allCheckData"/>
	        </div></th>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">名称</span></div></th>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">地区</span></div></th>
	        
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">联系人</span></div></th>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">手机</span></div></td>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">电话</span></div></td>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">邮箱</span></div></td>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">注册时间</span></div></td>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">是否停用</span></div></td>
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">逻辑删除</span></div></td>
	        
	        <th width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">操作</span></div></th>
	      </tr>
	      <volist name="teamList" id="data">
			<tr>
			     <td height="20" bgcolor="#FFFFFF"><div align="center">
		          <input type="checkbox" name="checkData[]" id="checkData_{$data.ST_ID}" value="{$data.ST_ID}" />
		        </div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.ST_NAME}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.ST_AREA}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.RP_U_RNAME}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.ST_MOBILE}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.ST_PHONE}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.ST_EMAIL}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">{$data.CREATED_AT}</span></div></td>
		        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
		        <if condition="$data.IS_BLOCK eq 1">
		        	停用
		        <else/>
		        	正常
		        </if>
		        </div></td>
		        
		        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
		        <if condition="$data.IS_DEL eq 1">
		        	<font color="red">是</font>
		        <else/>
		        	否
		        </if>
		        </div></td>
		        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21"><a href="#" onclick="lineDel('{$data.ST_ID}');return false;">删除</a></div></td>
	      	</tr>
	      </volist>
	    </table>
	    
	    </td>
	  </tr>
  
  </if>
  
  <tr>
  	<td height="20" bgcolor="#FFFFFF" class="pageToolbar" align="left">{$page}</td>
  </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
